<template>
  <Top :data="chartDataObj" />
  <Center :data="chartDataObj" />
  <Bottom />
</template>
<script lang="ts" setup>
//引入首页三个子组件
import Top from "./Top/index.vue";
import Center from "./Center/index.vue";
import Bottom from "./Bottom/index.vue";
import { reqChartData } from "@/api/home";
import { onMounted, ref, watch } from "vue";
const chartDataObj = ref({});
const show = ref<any>(1)
onMounted(() => {
  getData();
});
const getData = async () => {
  const result = await reqChartData();
  chartDataObj.value = result;
};
</script>

<style scoped>
.home {
  width: 100%;
  height: 100%;
  padding: 20px;
  font-size: 30px;
}
</style>
